package com.gzj.springboot.service;

import com.gzj.springboot.domain.OftenCities;
import com.gzj.springboot.mapper.OftenCitiesMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OftenCitiesservice {
    @Autowired
    private OftenCitiesMapper oftenCitiesMapper;

    /**
     * 根据user_name查询
     * @param user_name
     * @return
     */
    public List<OftenCities> queryCity(String user_name){
        return oftenCitiesMapper.queryCity(user_name);
    }

   //添加常用城市
    public int addCity(String city,String user_name){
        return oftenCitiesMapper.addCity(city, user_name);
    }
   //删除常用城市
   public int deleteCity(String city,String user_name){return oftenCitiesMapper.deleteCity(user_name,city);}
}
